DPL: allow CallbacksPolicy to have access to command line options#7534
Conversation
|
@shahor02 this still requires some adjustments to the tests, but it should be all we need. |
78e1e76 to
361c54f
Compare
|
@shahor02 @davidrohr this is now compiling also the tests. Testing on hyperloop to make sure it does not break stuff. |
| // auto filename = context.options().get<std::string>("filename"); | ||
| return false; | ||
| }, | ||
| [](CallbackService& service, InitContext& context) { |
There was a problem hiding this comment.
Hi @ktf
seems to work as expected except 1 problem: the filename for the tf-info vector comes via workflow global options, i.e. ConfigContext, as you correctly have it in the 1st lambda. Can the second lambda also have ConfigContext supplied (InitContext does not hurt but useless in this particular case).
There was a problem hiding this comment.
I thought InitContext actually had also the workflow option. I will try to fix that.
There was a problem hiding this comment.
let me check, did not know it is supposed to pass the global options.
There was a problem hiding this comment.
@ktf I've checked, global options are not accessible via InitContext.options()
There was a problem hiding this comment.
It's supposed to pass all the options which apply to a given DataProcessorSpec. I do not remember if workflow options are considered "global".
There was a problem hiding this comment.
well, in the o2-global-track-cluster-reader --track-types ITS --cluster-types ITS --hbfutils-config o2_tfidinfo.root
the particular reader devices don't see the option --hbfutils-config.
There was a problem hiding this comment.
@ktf Looks like there is more serious problem: the customize(std::vector<o2::framework::CallbacksPolicy>& policies) defined for particular workflow, checks all devices of the global merged workflow. So, to make it work currently I need to pass the option (filename with TF header infos) to all these workflows. I.e. since both o2-global-track-cluster-reader and o2-its-reco-workflow have this customize, I need to call the workflow as
o2-global-track-cluster-reader --track-types ITS --cluster-types ITS --hbfutils-config o2_tfidinfo.root ... | \
o2-its-reco-workflow --clusters-from-upstream --hbfutils-config o2_tfidinfo.root ...
otherwise the o2-its-reco-workflow checks the devices of the o2-global-track-cluster-reader against its own hbfutils-config option (by default pointing to `o2simdigitizerworkflow_configuration.ini).
No description provided.